package com.hundredapp.oa.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

public interface GenericDao<T, ID extends Serializable> {
	
    public ID save(T entity);
    
    public void saveOrUpdate(T entity);

    public void remove(T entity);

    public void removeAll(Collection<T> entities);

    public void modify(T entity);

    public T findById(ID id);
    
    public List<T> find(String condition,int start,int limit);
    
    public int count(String condition);
    
    public List<T> find(String condition);
    
    public T findUnique(String condition);
    
    public List<T> executeQuery(String hql, Object...values);
}
